package top.milkbox.info;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 前后端通讯数据协议
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class R {
    private boolean flag = false; // 当前操作是否成功
    private Object data = null; // 操作后返回的数据
    private String message = ""; // 其他的特殊信息

    public R(boolean flag) {
        this.flag = flag;
    }

    public R(boolean flag, Object data) {
        this.flag = flag;
        this.data = data;
    }

}
